home *** CD-ROM | disk | FTP | other *** search
- ; IBMA.ASM
- name IBMA
- include dos.mac
- ; Assembler-language machine-dependent code for the IBM PC
- ; version of AutoCAD.
-
-
-
- dseg ibma ; ** start data segment **
- dbent equ this dword
- dw dgroup:doint
- dw 0 ;ds plugged here.
- doint proc far
- int 0 ;int plugged here.
- ret
- doint endp
-
- endds ibma ; ** end data segment **
-
-
- pseg ibma_ ; ** start code segment **
-
- public aconin,ibmbios
-
- ; char=aconin(): If a keyboard input character is
- ; available, return it, else 0. Set bit
- ; 80h for extended codes.
-
-
- aconin proc far
- mov dl,0FFH ;Ask
- mov ah,6 ; for a
- int 21H ; character from the console.
- jz nochar ;Zero flag means none available.
- or al,al ;If al=0, extended code,
- jnz gotchar ; call OS for
- int 21H ; second part.
- or al,80h ;Set high bit to flag it special.
- jmp short gotchar
- nochar:
- xor al,al ;No character.
- gotchar:
- xor ah,ah
- ret
- aconin endp
-
-
- ; ibmbios(int, ah, al, dx, cx, bx):
-
- ; will put the arguments in the named registers and take the
- ; specified interrupt. Returns whatever lands in ax (and dx).
-
- ibmbios proc far
- push bp
- mov bp,sp
- mov ah,args ;Plug the
- mov byte ptr doint+1,ah ; interrupt number.
- mov ah,args+2
- mov al,args+4
- mov dx,args+6
- mov cx,args+8
- mov bx,args+10
- mov word ptr dbent+2,ds ;Store ds for far call
- call dbent ; into d-bank.
- pop bp
- ret
- ibmbios endp
-
- endps ibma_
- end